package cn.kent.controller;

import cn.kent.config.RabbitQueueConfig;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloQueueController {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    @RequestMapping("hello/queue")
    public void hello() {
        rabbitTemplate.convertAndSend(RabbitQueueConfig.QUEUE_DELAY_EXCHANGE_NAME, RabbitQueueConfig.QUEUE_DELAY_QUEUE_NAME, "hello, kent总");
    }
}
